import {VisibilityFilters, SET_VISIBILITY_FILTER} from '../action-types'

export const changeVisibilityFilter = filter => {
    if (!Object.keys(VisibilityFilters).includes(filter)) {
        console.error(`changeVisibilityFilter: 无法设置filter为${filter}`)
        return
    }
    return {type: SET_VISIBILITY_FILTER, filter}
};